import React, { Component } from 'react'
class App extends Component {
    state = {
        name: 'danqian'
    }
    add () {
        debugger
        this.setState({
            name: 'lirongfei'
        })
    }
    render () {
        return (
            <section>
                <span>{ this.state.name }</span>
                <button onClick={this.add.bind(this)}>增加state1</button>
            </section>
        )
    }
}
export default App
